package sharewithus.business.dao.impl;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import sharewithus.business.dao.IUserDAO;
import framelib.dao.AbsDAO;

/**
 * Title:EXDAOImpl
 * Description:test DAO
 * @Create_by:Vince Yu
 * @Create_date:2012-5-4
 * @Last_Edit_By:
 * @Edit_Description
 * @version:partynano 1.0
 * 
 */
@SuppressWarnings("unchecked")
public class UserDAOQImpl extends AbsDAO implements IUserDAO {
	private static final Log log = LogFactory.getLog(UserDAOQImpl.class);

	public int saveUser(String email, String nickname, String password,
            Timestamp resTime) {
				return 0;
	    // TODO Auto-generated method stub
	    
    }

	public void saveUserExt(int userId, int extId, String extValue,
            int permission, int flag, Timestamp lastUpdateTime) {
	    // TODO Auto-generated method stub
	    
    }
	
	public Object getUserBy(String var, String type) {
		Map<String, Object> param = new HashMap<String, Object>();
	    param.put(type, var);
	    Object user = this.getSqlMapClientTemplate().queryForObject("getUser", param);
	    return user;
	}
	
	public List getUserExtBy(String var, String type) {
		Map<String, Object> param = new HashMap<String, Object>();
	    param.put(type, var);
	    List userId = this.getSqlMapClientTemplate().queryForList("getUserExt", param);
	    return userId;
	}

	public int updateUser(int userId, String email, String nickname,
            String password,
			String avatar, Timestamp resTime) {
	    // TODO Auto-generated method stub
	    return 0;
    }

	public void deleteUserExt(int userId) {
	    // TODO Auto-generated method stub
	    
    }
}